<html>
<head>
	<meta charset="utf-8"/>
	<title>全文搜索</title>
	<script src="jquery-1.12.3.min.js" type="text/javascript"></script>
</head>
<body>
		<input type="text" name="changeId" value="273" id="changeId">
		<select name="type" id="type">
			<option value="article">article</option>
			<option value="download">download</option>
			<option value="product">product</option>
		</select>
		<select name="action" id="action">
			<option value="1">1</option>
			<option value="0">0</option>
		</select>
		<button id="searchSubmit">提交</button>
		
	<div id="test">
		<p>success</p>
	</div>
	
<script>
$(function(){
	$("#searchSubmit").click(function(){
		$.ajax({
			url: '/Lucene531/servlet/ManagerServlet',
            type: 'get',
            dataType: 'json',
            data: { "type" : $("#type").val(),"id": $("#changeId").val(),"visible":$("#action").val() },
            beforeSend:function(){
            	$('#test').html("");
            },
			success:function(data){
				$("#test").append("<p>" + data.errCode + "</p>");
			},
			error:function(e){
				$("#test").append("<p>" + data.errCode + "</p>");
			}
		});
	});
}); 
</script>
	
</body>
</html>